package thread;

public class demo11 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {
            while (true) {
                try {
                    Thread.sleep(10000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                System.out.println("hello world");
            }
        });
        t.start();
        t.join(10000000);
        System.out.println("main");
    }


}
